.footer
    nav.navbar.navbar-default
        .container
            .navbar-header
                button.navbar-toggle.collapsed(type='button', data-toggle='collapse', data-target='#navbar-collapse-1', aria-expanded='false')
                    span.sr-only Toggle navigation
                    span.icon-bar
                    span.icon-bar
                    span.icon-bar
                a.navbar-brand(href='/') Movie Web
            #navbar-collapse-1.collapse.navbar-collapse
                ul.nav.navbar-nav.navbar-right
                    if user
                        li.dropup
                            a.dropdown-toggle(href='#', data-toggle='dropdown', aria-haspopup='true', aria-expanded='false') 欢迎您，#{user.name}
                                span.caret
                            ul.dropdown-menu
                                li
                                    a(href='#', data-toggle='modal', data-target='#userUpdateModal') 修改密码
                        li
                            a(href='/user/logout') 登出
                    else
                        li
                            a(href='/user/signup') 注册
                        li
                            a(href='/user/signin') 登录
if user
    #userUpdateModal.modal.fade(tabindex='-1', role='dialog', aria-labelledby='userUpdateLabel')
        .modal-dialog(role='document')
            .modal-content
                .modal-header
                    button.close(type='button', data-dismiss='modal', aria-label='Close')
                        span(aria-hidden='true') &times;
                    h4#userUpdateLabel.modal-title 修改密码
                form(method='POST', action='/user/update')
                    .modal-body
                        .form-group
                            input(type='hidden', value='#{user._id}', name='id')
                            label.sr-only(for='password') 密码
                            input#password.form-control(type='password', name='password', placeholder='密码')
                    .modal-footer
                        button.btn.btn-default(type='button', data-dismiss='modal') 关闭
                        button.btn.btn-primary(type='submit') 提交

    script(src='/libs/md5/md5.min.js', type='text/javascript')
    script(src='/js/md5.js', type='text/javascript')